1
허구 문제 해결하기: RAG 오픈 북 메서드론
EvoClass-AI005Lecture 4
00:00

전문적인 환경에서 인공지능을 사용하는 데 있어 가장 큰 장애물은 허구 문제. 이는 대규모 언어 모델(LLM)이 훈련 데이터 속 패턴에 의존해야 하기 때문에 실시간으로 검증된 정보가 아니라, 자신감 있게 사실, 날짜 또는 인용문을 창조할 때 발생합니다.

1. '폐쇄 책'에서 '개방 책'으로

대부분의 사용자는 모델이 내부 가중치(메모리)에만 의존하는 '폐쇄 책' 방식으로 인공지능과 상호작용합니다. 전문 수준의 정확도를 달성하기 위해 우리는 검색 보강 생성(RAG)이라는 '개방 책 시험' 방식으로, 응답을 생성하기 전에 특정하고 관련 있는 문서를 참조하도록 인공지능에 제공합니다.

2. LLM을 사고 엔진으로 활용하기

RAG 프레임워크에서는 LLM이 정적 데이터베이스로 작동하는 것을 멈추고 사고 엔진으로 전환됩니다. 질문을 할 때 시스템은 당신의 '두 번째 뇌'(선택적으로 구성한 PDF 파일과 노트)에서 관련된 문장을 검색하여 맥락으로 제시합니다. 모델의 역할은 '기억에서 되살리는 것'에서 '제공된 사실을 요약하고 통합하는 것'으로 바뀝니다. 이는 출력이 당신의 구체적인 데이터 기반임을 보장하며, 논리적으로 표현하면:

$$ \text{응답} = \text{LLM}(\text{질문} + \text{맥락}) $$

RAG 로직 흐름
Question 1
Why do LLMs "hallucinate" in a professional context?
They are programmed to lie to the user.
They try to predict the next word based on outdated or insufficient training data.
They have too much access to real-time internet data.
Question 2
In the RAG methodology, what is the primary purpose of the "Context"?
To make the prompt longer and more expensive.
To provide a factual anchor that prevents the model from drifting into invention.
To teach the model a new language.
Challenge: Reducing Error Probability
Applying RAG principles to legal documents.
You need to use an AI to summarize a 50-page legal contract without it making up clauses.
Step 1
Identify the "Search Space" for the AI.
Solution:
Instead of asking general questions, upload the PDF to a RAG-enabled tool (like NotebookLM) to constrain the AI’s search space strictly to that specific document.